package com.triz.business.service.impl;

import java.util.List;
import java.util.Map;

import com.triz.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.triz.business.mapper.ComponentAnalysisMapper;
import com.triz.business.domain.ComponentAnalysis;
import com.triz.business.service.IComponentAnalysisService;

/**
 * 组件分析Service业务层处理
 * 
 * @author hlk
 * @date 2025-11-13
 */
@Service
public class ComponentAnalysisServiceImpl implements IComponentAnalysisService 
{
    @Autowired
    private ComponentAnalysisMapper componentAnalysisMapper;

    /**
     * 查询组件分析
     * 
     * @param id 组件分析主键
     * @return 组件分析
     */
    @Override
    public ComponentAnalysis selectComponentAnalysisById(Long id)
    {
        return componentAnalysisMapper.selectComponentAnalysisById(id);
    }

    /**
     * 查询组件分析列表
     * 
     * @param componentAnalysis 组件分析
     * @return 组件分析
     */
    @Override
    public List<ComponentAnalysis> selectComponentAnalysisList(ComponentAnalysis componentAnalysis)
    {
        return componentAnalysisMapper.selectComponentAnalysisList(componentAnalysis);
    }

    /**
     * 新增组件分析
     * 
     * @param componentAnalysis 组件分析
     * @return 结果
     */
    @Override
    public int insertComponentAnalysis(ComponentAnalysis componentAnalysis)
    {
        componentAnalysis.setCreateTime(DateUtils.getNowDate());
        return componentAnalysisMapper.insertComponentAnalysis(componentAnalysis);
    }

    /**
     * 修改组件分析
     * 
     * @param componentAnalysis 组件分析
     * @return 结果
     */
    @Override
    public int updateComponentAnalysis(ComponentAnalysis componentAnalysis)
    {
        componentAnalysis.setUpdateTime(DateUtils.getNowDate());
        return componentAnalysisMapper.updateComponentAnalysis(componentAnalysis);
    }

    /**
     * 批量删除组件分析
     * 
     * @param ids 需要删除的组件分析主键
     * @return 结果
     */
    @Override
    public int deleteComponentAnalysisByIds(Long[] ids)
    {
        return componentAnalysisMapper.deleteComponentAnalysisByIds(ids);
    }

    /**
     * 删除组件分析信息
     * 
     * @param id 组件分析主键
     * @return 结果
     */
    @Override
    public int deleteComponentAnalysisById(Long id)
    {
        return componentAnalysisMapper.deleteComponentAnalysisById(id);
    }

    @Override
    public List<ComponentAnalysis> selectInteractionList(Map<String, Object> map) {
        return componentAnalysisMapper.selectInteractionList(map);
    }

    @Override
    public List<ComponentAnalysis> queryComponentAnalysisList(Map<String, Object> map) {
        return componentAnalysisMapper.queryComponentAnalysisList(map);
    }
}
